package org.csmz.xg2333.Example131415;

public class Example15 {
    public static void main(String[] args){
    Animal animal = new Dog();
    if(animal instanceof Dog) {
        Dog dog = (Dog) animal;
        dog.print2();
    }else {
        System.out.println("不符合");
    }
    }
}
